class CarModel {
  int? errcode;
  String? errmsg;
  List<CarItemModel>? data;
  String? message;

  CarModel({this.errcode, this.errmsg, this.data, this.message});

  CarModel.fromJson(Map<String, dynamic> json) {
    errcode = json['errcode'];
    errmsg = json['errmsg'];
    if (json['data'] != null) {
      data = <CarItemModel>[];
      json['data'].forEach((v) {
        data!.add(new CarItemModel.fromJson(v));
      });
    }
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['errcode'] = this.errcode;
    data['errmsg'] = this.errmsg;
    if (this.data != null) {
      data['data'] = this.data!.map((v) => v.toJson()).toList();
    }
    data['message'] = this.message;
    return data;
  }
}

class CarItemModel {
  var id;
  String? name;
  String? number;
  String? model;
  String? type;

  CarItemModel({this.name, this.number, this.model, this.type,this.id});

  CarItemModel.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
    number = json['number'];
    model = json['model'];
    type = json['type'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['number'] = this.number;
    data['model'] = this.model;
    data['type'] = this.type;
    return data;
  }
}
